﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ProjectClass.DAL;
namespace ProjectClass.View.FrontEnd
{
    public partial class Home : System.Web.UI.Page
    {
        ProjectClassEntities db = new ProjectClassEntities();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                LoadNewProduct();
            }
        }
        private void LoadNewProduct()
        {
            ReNewProduct.DataSource = db.tbl_Product.Where(m => m.IsActive == true).OrderByDescending(m => m.DateCreated).Take(8).ToList();
            ReNewProduct.DataBind();
        }
    }
}